<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/tern/tern-tags.tld" prefix="tern" %>
<tern:page pageForm="teacher.StudentTextExcelPage">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
     <title>学生选课信息</title>
<meta http-equiv="pragma" content="no-cache" />
     <meta http-equiv="cache-control" content="no-cache" />
     <meta http-equiv="expires" content="0" />  
     <link href="${applicationScope.root}js/toolbar/toolbar.css"
	 rel="stylesheet" type="text/css" /> 
     <link rel="stylesheet" type="text/css" href="${applicationScope.root}skins/default/main.css">
     <link type="text/css" href="${applicationScope.root}js/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
     <script type="text/javascript" src="${applicationScope.root}js/jquery.min.js"></script>  
     <script type="text/javascript" src="${applicationScope.root}js/ui/jquery-ui.min.js"></script>   
     <script type="text/javascript" src="${applicationScope.root}js/toolbar/toolbar.js"></script>      
     <script type="text/javascript" src="${applicationScope.root}js/util.js"></script>
     <script language="javascript">
     $(function() {
			$("#toolbar1").commonBar(
					{
						rootPath : '${applicationScope.root}js/toolbar/',
						commandClick : function(cmd) {
							var id = firstChecked('curriculaID');		
								if (cmd == 'score') {
								if (id == null) {
									alert('您没有选中任何数据!');
									return;
								} else {
									openDialog('totalScoreEdit.jsp?id='+id+'&time=' +(new Date()).getTime(),"totalScoreEdit",300,300,450,200);
							}
							}else if (cmd == 'test') {
								if (id == null) {
									alert('您没有选中任何数据!');
									return;
								} else {
									openDialog('submit.jsp?id='+id+'&time=' +(new Date()).getTime(),"submit",830,600,280,50);
							}
							}else if (cmd == 'export') {
								var rootDir = "${page.webSite}${applicationScope.root}";
								var url=rootDir+'teacher/studentTestExcel.jsp?time='+ (new Date()).getTime();
								var tid=document.getElementById('tid').value;
								var classid=document.getElementById('classid').value;
								var classCode=document.getElementById('classCode').value;
								var course=document.getElementById('course').value;
								var start=document.getElementById('startTimeString').value;
								var teacher=document.getElementById('teacher').value;
								url=url+'&tid='+tid+'&classid='+classid+'&classCode='+classCode+'&course='+course+'&startTimeString='+start+'&teacher='+teacher;
								openExcel(url);
							}else if (cmd == 'info') {
								if (id == null) {
									alert('您没有选中任何数据!');
									return;
								} else {
									openDialog('studentInfo.jsp?id='+id+'&time=' +(new Date()).getTime(),"studentInfo",350,350,450,100);
								}
							
							}	
						}
					});
		});
  </script>
</head>
<style type="text/css">
body {
	margin: 0px 8px 8px;
}
</style>
<body>
  <tern:form method="post" id="myForm">
   <input type="hidden" id="tid" value="${page.teacherID}" />
  <input type="hidden" id="classid" value='${page.classid}' />
  <input type="hidden" id="classCode" value='${page.classCode}' />
  <input type="hidden" id="course" value='${page.course}' />
  <input type="hidden" id="startTimeString" value='${page.startTimeString}' />
  <input type="hidden" id="teacher" value='${page.teacher}' />
  
	 <ul id="toolbar1">
  		<li>-</li><li>-</li>
		 
		<li style="width: 130px"><img
			src="${applicationScope.root}skins/common/bt_x.png" /> <a
			href='#test'>学生各项实验</a>
		</li>
		 
		<li style="width: 120px"><img
			src="${applicationScope.root}skins/common/bt_print.png" /> <a
			href='#info'>学生个人信息</a>
		</li>
		<li style="width: 120px"><img
			src="${applicationScope.root}skins/common/bt_print.png" /> <a
			href='#export'>导出Excel</a>
		</li>
		
	</ul>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>  
        <td>         
           <div class="title"><span>当前位置：</span>实验查询 &gt; 学生实验成绩查询 </div> 
           </td>    
         	
        </tr>         
      </table>
      
       <div>
			<table id="chooseTable" width="100%" border="0" cellspacing="0"
				cellpadding="0" align="center">
				<tr>
					<td height="1">
						<div class="filter" style="border-bottom: 1px solid #ccc;">
							选择教学班：
         					<select name="classid" style="width:350px">
         					  ${page.classSelection}
         	 				</select>
							&nbsp;&nbsp;
							<input name="onQry" id="onQry"
								type="button" class="inputButton" value=" 查 询 "
								onClick="on_event('onQry','')" />
							
						</div></td>
				</tr>
			</table>
		</div>
      
      
        <tern:table id="enTable" dataSource="${page.curricula}">
            <tern:theader>
            <tern:tcell width="75" height="24" align="center">选择</tern:tcell>
                 <tern:tcell align="center">学号</tern:tcell>
                  <tern:tcell align="center">姓名</tern:tcell>
                <tern:tcell align="center">实验总分数 </tern:tcell>
                <c:forEach items="${page.testIDs}" var="id">
                <tern:tcell align="center">${page.testMap[id] } </tern:tcell>
                </c:forEach>
	        </tern:theader>
	        <tern:trow>	
	        <tern:tcell height="22" align="center">
				<input value='${item.curriculaID}' name="curriculaID" type="radio" />
				</tern:tcell>
                <tern:tcell>&nbsp;${item.stuNum}</tern:tcell>
                 <tern:tcell>&nbsp;${item.stuName}</tern:tcell>
                <tern:tcell>&nbsp;${item.total}</tern:tcell>
                
               <c:forEach items="${page.testIDs}" var="id">
                <tern:tcell>&nbsp;${item[id]}</tern:tcell>  
                </c:forEach>              

	       </tern:trow>	       
        </tern:table>
        <input name="b_refreah" type="button" value="刷新" style="display:none" onClick="on_event('onRefresh','')"/>
  </tern:form>
</body>
</html>
</tern:page>
